import request from '@/utils/request'
// 查询分页列表信息
export const getdefectlistapi = params => request.get('/pio-microservice-biz/pio/defect/work/order/page', { params })
// 查询消缺人列表或者验收人列表
export const getxiaoquelistapi = params => request.get('/pio-microservice-biz/pio/defect/work/order/getSolveOrCheckUser', { params })
// 新增时获取工单编号
export const getcodeapi = () => request.get('/pio-microservice-biz/pio/defect/work/order/getCode')
// 新增
export const postadddefectapi = data => request.post('/pio-microservice-biz/pio/defect/work/order/add', data)
// 多个文件上传
export const postimguplodapi=data=>request.post('/pio-microservice-biz/pio/defect/work/order/muti/file/update',data,{
  headers: {
    'Content-Type': 'multipart/form-data' // 设置请求头的 Content-Type 为 multipart/form-data
  }
})
// 根据图片id查询某个图片
export const getdangeimgapi = params => request.get('/pio-microservice-biz/pio/defect/work/order/getSingleFile', { params })
// 根据id查询多个图片
export const getarrdefectimgapi = params => request.get('/pio-microservice-biz/pio/defect/work/order/getMutiFileByOrderId', { params })
// 修改
export const postupdatelistapi = data => request.post('/pio-microservice-biz/pio/defect/work/order/update', data)
// 删除
export const postdellistapi = id => request.post(`/pio-microservice-biz/pio/defect/work/order/delete?id=${id}`)
// 提交
export const posttijiaolistapi = data => request.post('/pio-microservice-biz/pio/defect/work/order/submit', data)
// 消缺保存
export const postxiaoqueapi = data => request.post('/pio-microservice-biz/pio/defect/work/order/solve', data)
// 验收工单
export const postyanshouapi=data=>request.post('/pio-microservice-biz/pio/defect/work/order/check',data)